<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.knife.db.ComDAL" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%
String parameter=request.getParameter("parameter");
String mulitCid=request.getParameter("mulitCid");
mulitCid=mulitCid.substring(0,mulitCid.length()-1);
String[]cids= mulitCid.split(",");
String env="";
for(int i=0;i<cids.length;i++){
env+="'"+cids[i]+"',";
}
if(env.length()>0){
env=env.substring(0,env.length()-1);
}
if(parameter.equals("del")){
ComDAL dal=new ComDAL();
try{
dal.execCommand("delete from blogreview where cid in ("+env+")");
out.print("delete from blogreview where cid in ("+env+")");
dal.close();
//response.sendRedirect("reviewManage.jsp");
}catch(Exception ex){
out.print("操作失败："+ex.getMessage());
dal.close();
}
}

if(parameter.equals("check")){
ComDAL dal=new ComDAL();
try{
dal.execCommand("update  blogreview  set status=1 where cid in ("+env+")");
out.print("操作成功！<a href=\"\">点击这里返回</a>");
dal.close();
//response.sendRedirect("reviewManage.jsp");
}catch(Exception ex){
out.print("操作失败："+ex.getMessage());
dal.close();
}
}
%>